Tests for Fast DTW and Threshold in tetrode data

2016.01.29


In [1]:
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import medfilt
import math
import gitInformation
from neo.io import NeuralynxIO
import sklearn
from scipy.interpolate import Rbf
import fastdtw
import time

In [2]:
gitInformation.printInformation()


Information about this notebook
============================================================
Date: 2016-01-29
Python Version: 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]
Git directory: C:\Users\Dominik\Documents\GitRep\kt-2015-DSPHandsOn\.git
Current git SHA: e6d8cd8a76886c134c66e781ccd5c61afc7f9e75
Remotes: origin, 
Current branch: master
origin remote URL: https://github.com/dowa4213/kt-2015-DSPHandsOn.git

In [3]:
# Session folder with all needed neuralynx files
sessionfolder = 'C:\\Users\\Dominik\\Documents\\GitRep\\kt-2015-DSPHandsOn\\MedianFilter\\Python\\08. Tests'

In [4]:
NIO = NeuralynxIO(sessiondir = sessionfolder, cachedir = sessionfolder)
block = NIO.read_block()
seg = block.segments[0]

In [5]:
analogsignals = {}
# Save all recorded datas in a analogsignals dictionary.
for i in range(len(seg.analogsignalarrays)):
    analogsignals["analogsignal{0}".format(i)] = seg.analogsignalarrays[i]

In [7]:
csc = {}
count = -1
# Extract the magnitude of each data.
for i in analogsignals:
    csc["csc{0}".format(i[-1])] = analogsignals[i].magnitude

In [ ]: